package com.secsbrain.deploy.client.model;

import com.secsbrain.deploy.client.constant.EnumDefinition;

import java.io.Serializable;
import java.util.Date;

/**
 * 构建记录
 *
 * @author zhaoyi
 */
public class BuildRecord implements Serializable{

	private static final long serialVersionUID = -3883354320800398091L;

	/** 构建ID */
	private Long buildId;

	/** 应用环境 */
	private String env;
	
	/** 构建主机，多个以,分隔 */
	private String hostNames;

	/** 应用名称 */
	private String appName;

	/** 应用ID */
	private Long appId;

	/** 构建分支 */
	private String branch;

	/** jenkins构建号 */
	private Long buildNo;
	
	/** 构建人 */
	private String createUser;

	/** 构建时间 */
	private Date createTime;
	
	/** 是否执行打包，0否1是 */
	private Integer packageCmd;
	/** 是否执行部署，0否1是 */
	private Integer deployCmd;
	/** 是否执行测试，0否1是 */
	private Integer testCmd;
	
	private Long approvalId;//审批ID
	
	/** 发布分组 */
	private String groupName;
	/** 分组ID */
	private Long groupId;
	/** 灰度百分比 */
	private Integer grayPercent;

	/**
	 * 状态，0-未构建（已审批），1-准备构建，2-构建中，3-构建成功，4-构建失败
	 * @see EnumDefinition.BuildStatus
	 */
	private Integer status;

	public Long getBuildId() {
		return buildId;
	}

	public void setBuildId(Long buildId) {
		this.buildId = buildId;
	}

	public String getEnv() {
		return env;
	}

	public void setEnv(String env) {
		this.env = env;
	}

	public String getHostNames() {
		return hostNames;
	}

	public void setHostNames(String hostNames) {
		this.hostNames = hostNames;
	}

	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}

	public Long getAppId() {
		return appId;
	}

	public void setAppId(Long appId) {
		this.appId = appId;
	}

	public String getBranch() {
		return branch;
	}

	public void setBranch(String branch) {
		this.branch = branch;
	}

	public Long getBuildNo() {
		return buildNo;
	}

	public void setBuildNo(Long buildNo) {
		this.buildNo = buildNo;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	public Integer getPackageCmd() {
		return packageCmd;
	}

	public void setPackageCmd(Integer packageCmd) {
		this.packageCmd = packageCmd;
	}

	public Integer getDeployCmd() {
		return deployCmd;
	}

	public void setDeployCmd(Integer deployCmd) {
		this.deployCmd = deployCmd;
	}

	public Integer getTestCmd() {
		return testCmd;
	}

	public void setTestCmd(Integer testCmd) {
		this.testCmd = testCmd;
	}

	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	public Long getGroupId() {
		return groupId;
	}

	public void setGroupId(Long groupId) {
		this.groupId = groupId;
	}

	public Integer getGrayPercent() {
		return grayPercent;
	}

	public void setGrayPercent(Integer grayPercent) {
		this.grayPercent = grayPercent;
	}

	public Long getApprovalId() {
		return approvalId;
	}

	public void setApprovalId(Long approvalId) {
		this.approvalId = approvalId;
	}
	
}
